<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css" />
  </head>

  <body>
    <div id="app">
      <div style="margin: 40px">
        <p>
          <label class="form-label">城市</label>
          <select v-model="city">
            <option v-for="{value,text} in cityArr" :value="value">
              {{text}}
            </option>
          </select>
        </p>
      </div>
    </div>
    <script type="module">
      import { createApp, ref, reactive, computed } from "./vue.esm-browser.js";
      const app = createApp({
        setup() {
          const city = ref("nj");
          const cityArr = ref([
            { value: "nj", text: "南京" },
            { value: "sh", text: "上海" },
            { value: "wx", text: "无锡" },
            { value: "bj", text: "北京" },
            { value: "tj", text: "天津" },
          ]);
          return { city, cityArr };
        },
      });

      app.mount("#app"); //挂载
    </script>
  </body>
</html>
